import { App, Directive } from "vue";
import copy from "@/utils/copy";
import throttle from "@/utils/throttle";
import debounceClick from "@/utils/debounce";

// 自定义指令
const directivesList:{ [key: string]: Directive } = {
    copy,
    throttle,
    debounceClick
}
const directives = {
  install: function (app: App<Element>) {
    Object.keys(directivesList).forEach(key => {
      app.directive(key, directivesList[key]);
    });
  }
};

export default directives;


